package com.example.monitor.model.VO;

import com.example.monitor.model.enums.AlarmStatus;
import lombok.Data;

import java.sql.Timestamp;
import java.time.LocalDateTime;

@Data
public class UserAbnormalRecordVO {
    private LocalDateTime alarmTime;   // 报警时间
    private String abnormalType;      // 异常类型
    private AlarmStatus status;            // 处理状态
    private String imageUrl;          // 图片URL(可选)

    public UserAbnormalRecordVO(
            Timestamp alarmTime,
            String alarmType,
            AlarmStatus status,
            String imageUrl
    ) {
        this.alarmTime = alarmTime.toLocalDateTime();
        this.abnormalType = alarmType;
        this.status = status;
        this.imageUrl = imageUrl;
    }
}